import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooWechatReplyController } from '../../../controllers';
const uctoowechatReplyRouter = new Router();
const wechatReplyController = new uctooWechatReplyController();

uctoowechatReplyRouter.post('/add', requireUser, wechatReplyController.add);
uctoowechatReplyRouter.post('/edit', requireUser, rowLevelPermission('uctoo/wechat_reply'), wechatReplyController.edit);
uctoowechatReplyRouter.post('/del', requireUser, rowLevelPermission('uctoo/wechat_reply'), wechatReplyController.delete);

//For getting wechatReply with permission control
uctoowechatReplyRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/wechat_reply'), wechatReplyController.getSingle);
uctoowechatReplyRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/wechat_reply'), wechatReplyController.getMany);
uctoowechatReplyRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/wechat_reply'), wechatReplyController.getMany);

//#endregion AutoCreateCode
export default uctoowechatReplyRouter;
